<?

if($_SERVER['QUERY_STRING']) $par = decode_params();
if(!$errorMsg && $par[errorMsg]) $errorMsg=$par[errorMsg];
$data = list_reseller_plans($id,'array');
if(is_array($data))
	while(list($k,$v) = each($data)){
        	$buff = explode("|",$v[d]);
                $v[d] = $buff;
                if($v[has_domain]!='false'){
                	$domain_box = '1';
                        $domain_menu = '1';
                }
                if($v[offering]=='true') $hosting .= $v[plan];
                $v[description] = explode("|",$v[description]);
                $template[plans][$k] = $v;
	}

$return_url=$HTTP_GET_VARS[return_url];

$info1 = list_details($id,'array');
$info1 = $info1[0];
$info = array_merge($info1,$info2);
$info[fname]=$info[firstname];
$info[lname]=$info[lastname];
while(list($k,$v)=each($info))	if(!$$k) $$k=$v;


?> 

                  <table align=center width='580' class='border' cellspacing=0>
                    <tbody> 
                    <tr> 
                      <td valign=top align=middle> 
                        <table>
                          <tbody> 
                          <tr> 
                            <td  valign=top align=left> 
                              <?if($errorMsg){ echo "<center><b><font color=red>$errorMsg</font><b></center>"; $errorMsg="";}?>
                            </td>
                          </tr>
                          </tbody>
			</table>
				
      <table width="568">
        <tr> 
          <td colspan=2> 
            <p><font class="text"><b>Manual order and account activation</b><br>
              <br>
              From this section, you can purchase web hosting accounts and domain 
              names at wholesale price. Once you finalize the order, the e-mail 
              provided below will receive login information and he will be the 
              owner of the hosting account. The e-mail can be modified later from 
              the Control Panel. You can order any of the following web hosting 
              plans with or without domain name registration. The domain will 
              be registered using the information provided below.</font></p>
          </td>
        </tr>
      </table>
      <form action='http://www.duoservers.com/order.php' method='POST'>
        Billing and account information: 
        <table  align=center width=100% class='main'>
									<input type='hidden' name='id' value='<?echo $id?>'>
									<input type='hidden' name='action' value='order'>
									<input type='hidden' name='sid' value='<?=$sid?>'>

									<input type='hidden' name='return_url' value='http://resellerspanel.com/login'>
									<input type='hidden' name='manual_signup' value='3'>	
									<input type ='hidden' name='plan_to_display' value='<?echo $plan_to_display?>'>
                                    <tbody> 
                               			<tr>
											<td colspan=2>First Name: </td>
											<td> 
												 <input name=fname value='<?echo $fname?>'> 
											 </td>
										</tr>
							<tr>
								<td colspan=2>Last Name: </td>
								<td >
									<input name=lname value='<?echo $lname?>'>  </td>
							</tr>
							<tr>
								
            <td   colspan=2 > E-mail: (will receive login info)</td>
								<td> 
									<input  name=email value='<?echo $email?>'>
								  </td>
							</tr>
							<tr>
								<td   colspan=2> Address line 1:  </td>
								<td> 
								<input  size=30 name=address1 value='<?echo $address1 ;?>'>  </td>
							</tr>
							<tr>
								<td  colspan=2 > Address line 2:</td>
								<td   > 
									<input  size=30 name=address2 value='<?echo $address2?>'>  
								</td>
							</tr>
							<tr>
								<td   colspan=2 > City:  </td>
								<td   > 
									<input  size=30 name=city value='<?echo $city?>'>  </td>
							</tr>
							<tr>
								<td   colspan=2 > State/Province:  </td>
								<td   > 
									<input  size=16 name=state value='<?echo $state?>'>  </td>
							</tr>
							<tr>
								<td   colspan=2 > Zip/Postal Code:  </td>
								<td   > 
									<input  size=6 name=zip value='<?echo $zip?>'>  </td>
							</tr>
							<tr>
							  <td   colspan=2> Country: </td>
							  <td   >
								 
									<select  name=country>
										<?if(!$country)$country='US';echo get_countries($country)?>
									</select>
								  </td>
							</tr>
							<tr>
								<td   colspan=2 > Phone:  </td>
								<td   > 
								<input  size=30 name=phone value='<?echo $phone?>'>  </td>
							</tr>
							<tr>
							  <td   colspan=2 > Fax (Optional):  </td>
							  <td   > 
								<input  size=30 name=fax value='<?echo $fax?>'>  </td>
							</tr>
							<tr>
								<td colspan=2> User Name: </td>
								<td > 
									<input size=25 name=username value='<?echo $username?>'>
								  </td>
							</tr>
							<?if($userName=='hiena'){
								include('../u/server_list.php');
								$servers=array_keys($SETTINGS['servers']);
							?>
							<tr>
								<td colspan=2> Server </td>
								<td > <select name=server>
									<?foreach($servers as $s){?>
										<option value='<?=$s?>' <?if($server==$s)echo 'selected'?>><?=$s?></option>
									<?}?>

									</select>
								  </td>
							</tr>
							<?}?>

							<tr>
								<?include('plan_offer.php')?>	
							
							</tr>
                                        </tbody>
                                      </table>
                                    <center>
                                      <br>
                                      <input  type=reset value=Clear name="reset">
                                      &nbsp;&nbsp; 
                                      <input  type=submit value=" Submit " name="submit">
                                      <br>
                                    </center>
					<input type=hidden name='sid' value='<?=$sid?>'>
				</form>				
                      </td>
                    </tr>
                    </tbody>
                  </table>
